Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5263 persist default version info #862

Merged
merged 1 commit into from
Oct 27, 2020
Merged

Conversation

kstenerud
Copy link
Contributor

@kstenerud kstenerud commented Oct 26, 2020

Goal

When version data is not manually specified, it doesn't get stored to the config metadata JSON buffer, and thus doesn't get stored in any crash events. When loading the event, BugsnagApp tries to fetch the data from the event, then the config, then system data. Since the event data is not present, it ends up fetching current data instead of past data, and gives mismatched values for app version and version if they happen to change between the last crash and the next launch.

Design

Force version and app version to be persisted to the config metadata so that it's always available from config no matter how it was initialised.

ReleaseStage and AppType have also been modified to store their defaults this way.

Testing

Tested crashing the example app and changing version info before relaunch under the following conditions:

  • Don't manually config. Change info.plist version info between launches (where the bug occurred).
  • Manually config. Change manually set version info between launches.
  • Manually config. Change info.plist between launches (should make no difference to reported version info).
  • Manually config. Change info.plist and manually set version info between launches (should show manually set info).

@kstenerud kstenerud force-pushed the 5263-persist-default-version-info branch from ec8dbf9 to 33dd17e Compare October 26, 2020 16:12
@kstenerud kstenerud changed the base branch from master to next October 26, 2020 16:12
…t gets put into events when users don't manually set version info.
@kstenerud kstenerud force-pushed the 5263-persist-default-version-info branch from 23e7151 to c27d464 Compare October 27, 2020 11:41
@kstenerud kstenerud merged commit c4e3ef0 into next Oct 27, 2020
@kstenerud kstenerud deleted the 5263-persist-default-version-info branch October 27, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants